<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title></title>
	<link rel="stylesheet" href="">
</head>
<body>
	<script type="text/javascript">
		/**
		 * [obj description]
		 * @type {Object}
		 * [9,10,11,12,13,14,15,16,17,18,19,20,21]
			obj:{
				"2018-11-11":[10,11,12,13]
			}
		 */
		 var obj = {
		 	"2018-11-11":[9],
		 	"2018-11-12":[9,10],
		 }

		 /**
		  * obj = {
		  * 	"2018-11-11":[10,11,12,13,14,15,16,17,18,19,20,21],
		  * 	"2018-11-12":[11,12,13,14,15,16,17,18,19,20,21]
		  * }
		  */
		 
		 var arr = [9,10,11,12,13,14,15,16,17,18,19,20,21];
		 for(let key in obj){
		 	console.log("obj[key]",obj[key])
		 }

		// 找出数组中不同的元素
		var a1 = [9,10,11,12,13,14,15,16,17,18,19,20,21];
		var a2 = [9,10];
		var a=[1,2,3,4,5];
		var b=[1,2,3,7];
		var c=[];
		for(var i in a){
			c[a[i]]=a[i];
		}
		for(var i in b){
			if(c[b[i]]){
				delete c[b[i]];
			}else{
				c[b[i]]=b[i];
			}
		}
		for(var i in c){
			document.write(c[i]+",");
		}


		var a = [1,2,3,4,5,6,7];
		var b = [1,2,5];
		var c = [];
		var tmp = a.concat(b);
		var o = {};
		for (var i = 0; i < tmp.length; i ++) {};
		for (x in o) if (o[x] == 1) c.push(x);
		alert(c);
	</script>
</body>
</html>